package main

import (
	"fmt"
	//	"time"
)

func pump() chan int {
	ch := make(chan int)
	go func() {
		for i := 0; ; i++ {
			ch <- i
		}
	}()
	return ch
}


func main() {
	stream := pump()
	fmt.Println(<-stream)
	suck(stream)
}

func suck(ch chan int) {
	for { 
		i := <-ch 
		if i%1000000 == 0 {
			fmt.Println(i)
		}
	}
}
